home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / STDERRF.ZIP / STDERRF.INC < prev   
Text File  |  1995-05-29  |  2KB  |  96 lines

  1. .nolist
  2. ifndef    STDERRF_INC
  3.  
  4. comment ÷
  5.     STDERRF.INC                        V1.00
  6. ==========================================================================
  7. NAME
  8.     STDERRF.INC         Basic include file for STDERRF source files
  9.  
  10. DESCRIPTION
  11.     This include file is used as the basic include file for the STDERRF
  12.     source files.  This file includes information that is used by two or
  13.     more STDERRF source files.  These are:
  14.         Basic equates
  15.         Macros
  16.         Externdefs
  17.  
  18. PROGRAMMING NOTES
  19.     Listing is turned off so that include files do not lengthen source
  20.     file listings.
  21.  
  22. AUTHOR
  23.     Raymond Moon - 5 Feb 95
  24.     Copyright 1995 - Raymond Moon
  25.     ALL RIGHTS RESERVED
  26.  
  27. HISTORY
  28.     Version - Date        - Remarks
  29.     1.00    -  5 Feb 95    - Orginal
  30.  
  31.     ÷ End of Comment
  32.  
  33. ;----------------------------
  34. ;    Define equate to identify this include file to preclude being
  35. ;    included more than once.
  36.  
  37. STDERRF_INC    equ    1
  38.  
  39. ;----------------------------
  40. ;    Define the standard equates
  41.  
  42. CR    equ    13
  43. LF    equ    10
  44. TAB    equ     9
  45. STDERR    equ     2
  46. STDOUT    equ     1
  47. BELL    equ     7
  48.  
  49. ;----------------------------
  50. ;    Error equates
  51.  
  52. eqUSAGE     equ     0
  53. eqUSERTERM    equ     1
  54. eqBADDOSVER    equ     2
  55. eqDUPERR    equ     3
  56. eqCREATEERR    equ     4
  57. eqFORCEDUPERR    equ     5
  58. eqEXECERR    equ     6
  59. eqRESTOREERR    equ     7
  60. eqCLOSEERR    equ     8
  61.  
  62. eqMINDOSERR    equ    eqDUPERR
  63.  
  64. ;----------------------------
  65. ;    Exterdefs
  66.  
  67. externdef    STACK_BOTTOM:word    ; Offset of Stack bottom in DGROUP
  68. externdef    DGRP:word        ; Value of DGROUP
  69. externdef    PSP:word        ; Segment address of PSP
  70. externdef    ENVIRON:word        ; Segment address of ENVIRON
  71. externdef    OSMAJOR:byte        ; Integer part of OS system
  72. externdef    OSMINOR:byte        ; Decimal part of OS system
  73.  
  74. ;----------------------------
  75. ;    Define any Macros
  76.  
  77. @WRITE    macro    WHAT:req, WHERE:req    ; Write String to device or file
  78.     mov    dx, offset WHAT     ; DS:DX => WHAT - DS assumed by macro
  79.     mov    cx, sizeof WHAT     ; CX = String length
  80.     mov    bx, WHERE        ; BX = Filehandle
  81.     mov    ah, 40h         ; Request write to device or file
  82.     int    21h            ; Call DOS
  83. endm
  84.  
  85. ;----------------------------
  86. ;    Define EXTERNDEFs for any variables used in more than one source
  87. ;    file.  Segment and Source file are identified.
  88.  
  89. externdef    DupStdErr:word        ; STDERRF.ASM - .DATA
  90.  
  91. ;----------------------------
  92. ;    Clean up
  93.  
  94. endif                    ; Close opening ifndef
  95. .list                    ; Turn list back on
  96.